﻿
<table class="table">
@if (ViewBag.listCDPS != null)
{
    <tr>
        <th>
            @Html.DisplayName("Level")
        </th>
        <th>
            @Html.DisplayName("Mã tài khoản")
        </th>
        <th>
            @Html.DisplayName("Tên tài khoản")
        </th>
        <th>
            @Html.DisplayName("Nợ đầu kì")
        </th>
        <th>
            @Html.DisplayName("Có đầu kì")
        </th>
        <th>
            @Html.DisplayName("Nợ phát sinh")
        </th>
        <th>
            @Html.DisplayName("Có Phát sinh")
        </th>
        <th>
            @Html.DisplayName("Nợ cuối kì")
        </th>
        <th>
            @Html.DisplayName("Có cuối kì")
        </th>
        <th></th>
    </tr>
        foreach (var item in ViewBag.listCDPS)
        {

            if (@item.isEmpty == false)
            {
                <tr>
                    @if (@item.Level == 0)
                {
                <td>
                    @item.Level
                </td>
                <td>
                    @item.MaTaiKhoan
                </td>
                <td>
                    @item.TenTaiKhoan
                </td>
                <td>
                    @item.NoDauKi.ToString("#,#.00#;(#,#.00#)")
                </td>
                <td>
                    @item.CoDauKi.ToString("#,#.00#;(#,#.00#)")
                </td>
                <td>
                    @item.NoPhatSinh.ToString("#,#.00#;(#,#.00#)")
                </td>
                <td>
                    @item.CoPhatSinh.ToString("#,#.00#;(#,#.00#)")
                </td>
                <td>
                    @item.NoCuoiKi.ToString("#,#.00#;(#,#.00#)")
                </td>
                <td>
                    @item.CoCuoiKi.ToString("#,#.00#;(#,#.00#)")
                </td>
                }
                else
                {
                <td style="font-weight: bold">
                    @item.Level
                </td>
                <td style="font-weight: bold">
                    @item.MaTaiKhoan
                </td>
                <td style="font-weight: bold">
                    @item.TenTaiKhoan
                </td>
                <td style="font-weight: bold">
                    @item.NoDauKi.ToString("#,#.00#;(#,#.00#)")
                </td>
                <td style="font-weight: bold">
                    @item.CoDauKi.ToString("#,#.00#;(#,#.00#)")
                </td>
                <td style="font-weight: bold">
                    @item.NoPhatSinh.ToString("#,#.00#;(#,#.00#)")
                </td>
                <td style="font-weight: bold">
                    @item.CoPhatSinh.ToString("#,#.00#;(#,#.00#)")
                </td>
                <td style="font-weight: bold">
                    @item.NoCuoiKi.ToString("#,#.00#;(#,#.00#)")
                </td>
                <td style="font-weight: bold">
                    @item.CoCuoiKi.ToString("#,#.00#;(#,#.00#)")
                </td>
                }
                </tr>
            }

        }
    }
</table>
